package com.bjypc.youth.service.impl;

import java.util.List;

import org.springframework.transaction.annotation.Transactional;

import com.bjypc.youth.dao.IPersonDao;
import com.bjypc.youth.entity.Person;
import com.bjypc.youth.service.IPersonService;
@Transactional
public class PersonServiceImpl implements IPersonService {

	private IPersonDao personDao;

	public Person find(Long id) {
		return this.personDao.findById(id);
	}

	public List<Person> findAll() {
		return this.personDao.findAll();
	}

	public void remove(Long id) {
		this.personDao.removeById(id);
	}

	public void save(Person person) {
		this.personDao.save(person);
		
	}

	public IPersonDao getPersonDao() {
		return personDao;
	}

	public void setPersonDao(IPersonDao personDao) {
		this.personDao = personDao;
	}
	
	

}
